﻿<Window x:Class="WpfWordsLearner.Views.ResultView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:conv="clr-namespace:WpfWordsLearner.Converters"
        Title="ResultView" Height="350" Width="515">
    <Grid>
		<Grid.Resources>
			<conv:BoolToImageConverter x:Key="converter"/>
		</Grid.Resources>
		<DataGrid x:Name="dgrResults" AutoGenerateColumns="False" ItemsSource="{Binding Path=Result,Mode=TwoWay}">
			<DataGrid.Columns>
				<DataGridTemplateColumn Header="Success" Width="60">
					<DataGridTemplateColumn.CellTemplate>
						<DataTemplate>
							<StackPanel>
								<Image x:Name="imgResult"
									   Source="{Binding Path=IsCorrect,Converter={StaticResource converter}}"/>
							</StackPanel>
						</DataTemplate>
					</DataGridTemplateColumn.CellTemplate>
				</DataGridTemplateColumn>
				<DataGridTextColumn Header="English"  Width="180" Binding="{Binding Path=Word.EnglishWord}"/>
				<DataGridTextColumn Header="Translate" Width="250"  Binding="{Binding Path=Word.Translate}"/>
			</DataGrid.Columns>
		</DataGrid>
	</Grid>
</Window>
